import { createApp } from 'vue'
import App from './App.vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import axios from './plugins/axios'
import router from './router'
import Terminal from 'vue-web-terminal'
import directives from './directives/index.js'
import {setupPinia} from "./plugins/pinia.js"
import {setupVxe} from "./plugins/vxe.js"
import "./assets/css/tailwindcss.css";
const app = createApp(App)
directives(app)
app.config.globalProperties.$http = axios

function setupApp(app) {
  // 挂载vuex状态管理
  setupPinia(app)
  setupVxe(app);
  app.use(router)
  app.use(Antd);
  app.use(Terminal)
  app.mount('#app');
}
setupApp(app)
// 接收渲染进程传递过来的mac地址
const mac = window.api.getMac()
mac.then((_) => {
  console.log('mac', _)
})
